const {get_type} = require('../service/web.service')

class WebController {
  async getType(ctx) {
    
    // 2、传递数据
    try{
      const res = await get_type()
      console.log(res)
      // 3、返回数据
      ctx.body = {
        code: 200,
        data: res,
        msg: "成功",
      }
    } catch(err) {
      console.log(err)

    }
  }
}

module.exports =  new WebController()